<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./animate.css">
  <style>
    .box{
      width:100px;
      height: 100px;
      background-color: rgb(164, 197, 46);
      margin: 100px auto;
    }
    .ani1-enter-active{
      animation:zoomInDown  1s;
    }
    .ani1-leave-active{
      animation:zoomOutDown  1s;
    }
    
  </style>
</head>
<body>
  <div id="app">
    <button @click="change">
      {{isShow?'隐藏':'显示'}}
    </button>
    <transition name="ani1">
      <div class="box" v-if="isShow"></div>
    </transition>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el:"#app",
      data:{
        isShow: true
      },
      methods:{
        change(){
          this.isShow = !this.isShow
        }
      }
    })
  </script>
</body>
</html>
